<template v-if="flag">
    <div class="container">
        <div class="playListDetail">
            <div class="playListDetail-left">
                <div class="playListDetail-left-message">
                    <div class="message-left">
                        <div class="message-left-img">
                            <img :src="DetailArr.songs[0]?.al.picUrl" alt="">
                            <span></span>
                        </div>
                        <div class="message-left-out">
                            <i></i>
                            <a href="">生成外链播放器</a>
                        </div>
                    </div>
                    <div class="message-right">
                        <div class="message-right-1">
                            <i></i>
                            <div class="message-right-1-title">
                                <!-- <em>{{DetailArr?.songs[0]?.name}}</em> -->
                                <div class="summary">TV动画《ONE PIECE海贼王》未来岛篇片尾曲</div>
                            </div>
                        </div>
                        <div class="message-right-2">
                            歌手：<span><a href="">大槻マキ</a></span>
                        </div>
                        <div class="message-right-2">
                            所属专辑：<a href="">Dear sunrise</a>
                        </div>
                        <div class="message-right-btn">
                            <a href="javascript:;" class="btn-play">
                                <i>
                                    <em></em>播放
                                </i>
                            </a>
                            <a href="javascript:;" class="btn-add"></a>
                            <a href="javascript:;" class="btn-fav">
                                <i>收藏</i>
                            </a>
                            <a href="javascript:;" class="btn-share">
                                <i>分享</i>
                            </a>
                            <a href="javascript:;" class="btn-dl">
                                <i>下载</i>
                            </a>    
                            <a href="javascript:;" class="btn-cmmt">
                                <i>(<span>99</span>)</i>
                            </a>
                        </div>
                        <div class="lyric-content">
                            作词 : 大槻マキ
                            <br>
                            作曲 : 久下真音/金子麻友美
                        </div>
                    </div>
                </div>
            </div>
            <div class="playListDetail-right">

            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { useRoute } from 'vue-router';
import { onMounted,ref } from 'vue';
import { reqSingDetail } from '@/api/playListDetail';
let route = useRoute()
let DetailArr = ref([])
let flag = ref(false)
onMounted(()=>{
    getSingDetail(route.query.id)  
})
const getSingDetail = async (ids:any)=>{
    let result = await reqSingDetail(ids)
    if(result.code==200){
        DetailArr.value = result
        flag.value = true
    }
}
</script>

<style scoped lang="less">
.playListDetail {
    width: 100%;
    display: flex;
    .playListDetail-left{
        width: 709px;
        padding: 47px 30px 40px 39px;
        .playListDetail-left-message{
            margin-top: -10px;
            .message-left{
                float: left;
                width: 206px;
                margin-right: -226px;
                .message-left-img{
                    width: 198px;
                    height: 198px;
                    position: relative;
                    img{
                        width: 130px;
                        height: 130px;
                        margin: 34px;
                    }
                    span{
                        display: block;
                        position: absolute;
                        width: 206px;
                        height: 205px;
                        top: -4px;
                        left: -4px;
                        background: url(../../assets/images/coverall.png) no-repeat;
                        background-position: -140px -580px;
                    }
                }
                .message-left-out{
                    float: left;
                    margin: 20px 0 0 46px;
                    display: flex;
                    align-items: center;
                    i{
                        display: block;
                        width: 16px;
                        height: 16px;
                        background: url(../../assets/images/icon.png) no-repeat;
                        background-position: -34px -863px;
                    }
                    a{
                        margin: 10px 0;
                        font-size: 12px;
                        color: #0c73c2;
                    }
                }
            }
            .message-right{
                float: right;
                width: 414px;
                .message-right-1{
                    display: flex;
                    align-items: flex-start;
                    i{
                        float: left;
                        display: block;
                        width: 54px;
                        height: 24px;
                        background: url(../../assets/images/icon.png) no-repeat;
                        background-position: 0 -463px;
                    }
                    .message-right-1-title{
                        margin-left: 10px;
                        position: relative;
                        font-size: 24px;
                        em{
                            margin-right: 7px;
                            display: block;
                            font-style: normal;
                            margin-bottom: 5px;
                        }
                        .summary{
                            margin: 1px 0 5px;
                            color: #bababa;
                            font-size: 14px;
                        }
                    }
                }
                .message-right-2{
                    margin: 10px 0;
                    color: #999;
                    font-size: 12px;
                    a{
                            color: #0c73c2;
                            &:hover{
                                text-decoration: underline;
                            }
                    }
                }
                .message-right-btn{
                    margin-bottom: 25px;
                    margin-right: -10px;    
                    &::after{
                        content: '';
                        display: block;
                        clear: both;
                    }
                    .btn-play{
                        color: #fff;
                        float: left;
                        background: url(../../assets/images/button2.png);
                        background-position: right -428px;
                        padding: 0 5px 0 0;
                        height: 31px;
                        line-height: 31px;
                        i{
                            padding: 0 7px 0 8px;
                            height: 31px;
                            line-height: 31px;
                            display: block;
                            font-size: 12px;
                            color: #fff;
                            background: url(../../assets/images/button2.png);
                            background-position: 0 -387px;
                            em{
                                float: left;
                                width: 20px;
                                height: 18px;
                                margin: 6px 2px 2px 0;
                                background: url(../../assets/images/button2.png);
                                background-position: 0 -1622px;
                                overflow: hidden;
                            }
                        }
                    }
                    .btn-add{
                        display: block;
                        padding: 0 5px 0 0;
                        margin-right: 5px;
                        width: 31px;
                        margin-left: -3px;
                        padding-right: 0;
                        background: url(../../assets/images/button2.png);
                        background-position: 0 -1588px;
                        float: left;
                        height: 31px;
                        line-height: 30px;
                        min-width: 23px;
                        cursor: pointer;
                    }
                    .btn-fav{
                        float: left;
                        height: 31px;
                        line-height: 30px;
                        min-width: 23px;
                        cursor: pointer;
                        color: #333;
                        padding: 0 5px 0 0;
                        margin-right: 6px;
                        background: url(../../assets/images/button2.png);
                        background-position: right -1020px;
                        i{
                            background: url(../../assets/images/button2.png);
                            background-position: 0 -977px;
                            padding-right: 2px;
                            padding-left: 28px;
                            padding: 0 7px 0 28px;
                            float: left;
                            height: 31px;
                            line-height: 30px;
                            min-width: 23px;
                            cursor: pointer;
                            font-size: 12px;
                        }
                    }
                    .btn-share{
                        float: left;
                        height: 31px;
                        line-height: 30px;
                        min-width: 23px;
                        cursor: pointer;
                        color: #333;
                        padding: 0 5px 0 0;
                        margin-right: 6px;
                        background: url(../../assets/images/button2.png);
                        background-position: right -1020px;
                        i{
                            background: url(../../assets/images/button2.png);
                            background-position: 0 -1268px;
                            padding-right: 2px;
                            padding-left: 28px;
                            padding: 0 7px 0 28px;
                            float: left;
                            height: 31px;
                            line-height: 30px;
                            min-width: 23px;
                            cursor: pointer;
                            font-size: 12px;
                        }
                    }
                    .btn-dl{
                        float: left;
                        height: 31px;
                        line-height: 30px;
                        min-width: 23px;
                        cursor: pointer;
                        color: #333;
                        padding: 0 5px 0 0;
                        margin-right: 6px;
                        background: url(../../assets/images/button2.png);
                        background-position: right -1020px;
                        i{
                            background: url(../../assets/images/button2.png);
                            background-position: 0 -2761px;
                            padding-right: 2px;
                            padding-left: 28px;
                            padding: 0 7px 0 28px;
                            float: left;
                            height: 31px;
                            line-height: 30px;
                            min-width: 23px;
                            cursor: pointer;
                            font-size: 12px;
                        }
                    }
                    .btn-cmmt{
                        float: left;
                        height: 31px;
                        line-height: 30px;
                        min-width: 23px;
                        cursor: pointer;
                        color: #333;
                        padding: 0 5px 0 0;
                        margin-right: 6px;
                        background: url(../../assets/images/button2.png);
                        background-position: right -1020px;
                        i{
                            background: url(../../assets/images/button2.png);
                            background-position: 0 -1465px;
                            padding-right: 2px;
                            padding-left: 28px;
                            padding: 0 7px 0 28px;
                            float: left;
                            height: 31px;
                            line-height: 30px;
                            min-width: 23px;
                            cursor: pointer;
                            font-size: 12px;
                            font-family: simsun, 宋体;
                        }
                    }
                }
                .lyric-content{
                    margin-top: 13px;
                    line-height: 23px;
                    font-size: 12px;
                    color: #333;
                }
            }
        }
    }
    .playListDetail-right{
        width: calc(100% - 709px);
    }
}
</style>